package com.example.dao;

import java.util.List;

import android.R.string;
import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

import com.example.model.Planete;

public class PlaneteDao {
	private static SQLiteDatabase db  ;
	private static final String KEY_ID = "id";
	private static final String COL_NOM = "nom";
	private static final String COL_TAILLE = "taille";
	private static final String COL_DISTANCETERRE =" distanceTerre";
	private static final String TABLE_PLANETE = "planetes";
	private static Context context;
	public static long  addPlanete(Planete p) {
		
		DataSource data = new DataSource(context);
		db=data.getWritableDatabase();
		ContentValues v =new ContentValues();
		v.put(COL_NOM,p.getNom());
		v.put(COL_TAILLE,p.getTaille() );
		v.put(COL_DISTANCETERRE,p.getDistanceTerre() );
		
		
		
	  return db.insert(TABLE_PLANETE, null, v);
	}

	public Planete getPlanete(int id) {
		return null;

	}


	public List<Planete> getAllPlanetes() { 
		return null;}


	public int getPlanetesCount() {
		return 0;}
	
	public int updatePlanete(Planete Planete) {
		return 0;}
	 
	// Deleting single Planete
	public void deletePlanete(Planete p) {
		
	}

}
